﻿using System.Data.SqlClient;
using System.Data;

namespace Team4Mock.DAO
{
    public class BusinessDAO
    {
        Helper h=new Helper();
        public  DataTable Getdata()
        {
            return h.GetData("Bus_Getdata");
        }
        public DataTable Search(int index,string name,string sic)
        {
            SqlParameter[]p=new SqlParameter[3];
            p[0]=new SqlParameter("@index",index);
            p[0].SqlDbType = SqlDbType.Int;
            p[1] = new SqlParameter("@name", name);
            p[1].SqlDbType = SqlDbType.NVarChar;
            p[2] = new SqlParameter("@sic", sic);
            p[2].SqlDbType = SqlDbType.VarChar;
            return h.GetData("Bus_Search", p);
        }
    }
}